<!--
 * @Description: 用于展示消息模板
 * @Version: 1.0
 * @Autor: chen_yt
 * @Date: 2020-11-02 17:15:31
 * @LastEditors: chen_yt
 * @LastEditTime: 2022-07-12 14:29:28
-->
<template>
  <div class="Template" style="min-width: 716px; height: 100%">
    <table-list :serverType="serverType" ref="feiShu"
      ><template v-slot:addButton slot-scope="">
        <div class="single-searchBox">
          <fks-button
            icon="fks-icon-plus"
            v-permission="['feiShuServer:add']"
            type="primary"
            @click="add"
          >
            <span style="vertical-align: middle">{{ LANG.ADD }}</span>
          </fks-button>
        </div></template
      >

      <template v-slot:editButton="slotProps">
        <fks-button
          type="text"
          v-permission="['feiShuServer:edit']"
          @click="edit(slotProps)"
          >{{ LANG.EDIT }}</fks-button
        ></template
      >
      <template v-slot:deleteButton="slotProps">
        <fks-button
          v-permission="['feiShuServer:delete']"
          danger-text
          @click="deleteRow(slotProps)"
          v-if="!slotProps.scope.row.state"
          >{{ LANG.DELETE }}</fks-button
        ></template
      ></table-list
    >
  </div>
</template>

<script>
import tableList from '../components/index'

export default {
  name: 'FeiShu',
  components: {
    tableList
  },
  data() {
    return {
      serverType: 'FeiShu'
    }
  },
  computed: {},
  watch: {},
  mounted() {},
  methods: {
    add() {
      this.$refs.feiShu.add()
    },
    edit(slotProps) {
      this.$refs.feiShu.edit(slotProps.scope)
    },
    deleteRow(slotProps) {
      this.$refs.feiShu.deleteRow(slotProps.scope)
    }
  }
}
</script>

<style scoped lang="scss">
</style>
